<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改论文选题')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-title-edit" th:object="${thesisTitle}">
            <input name="thesisId" th:field="*{thesisId}" type="hidden">
            <input name="thesisTeacher" th:field="*{thesisTeacher}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">题目名称：</label>
                <div class="col-sm-8">
                    <input name="thesisName" th:field="*{thesisName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">题目介绍：</label>
                <div class="col-sm-8">
                    <textarea name="thesisDesc" class="form-control">[[*{thesisDesc}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">题目类型：</label>
                <div class="col-sm-8">
                    <select name="thesisType" th:field="*{thesisType}" class="form-control m-b" th:with="type=${@dict.getType('thesis_type')}" disabled="true">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学年：</label>
                <div class="col-sm-8">
                    <input name="academicYear" th:field="*{academicYear}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">教师工号：</label>
                <div class="col-sm-8">
                    <input name="thesisTeacherUser.loginName" th:field="*{thesisTeacherUser.loginName}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "thesis/title";
        $("#form-title-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-title-edit').serialize());
            }
        }
    </script>
</body>
</html>